/*
    丢核桃
 */
public class Extend02 {
    public static void main(String[] args){
        int num = 1543;
        int waste = 0;//初始化

        while(num != 1){//不定次数的循环
            if(num % 2 == 1){
                num = (num - 1) / 2;
                waste += 1;
            }else num /= 2;
        }
        waste += 1;

        System.out.println(waste);
    }
}
